var MongoClient = require("mongodb").MongoClient;
var url = "mongodb://119.23.182.180:10086/srp";

MongoClient.connect(url, function (err, db) {
  if (err) throw err;
  console.log("数据库已连接!");
  var dbo = db.db("srp");
  var myobj = { name: "菜鸟教程", url: "www.runoob" };
  dbo.collection("myc3").insertOne(myobj, function (err, res) {
    if (err) throw err;
    console.log("文档插入成功");
    db.close();
  });
});
